package com.zkca.xf;

import android.os.Environment;


import com.zkca.xf.ui.activity.SplashActivity;
import com.zkca.xf.utils.LogUtil;
import com.zkca.xf.utils.SPUtil;

import java.io.File;

/**
 * Created by li on 2018/7/30.
 */
public class ConstantsXF {
    /**
     * 服务器主地址
     */




//     <service_version>
//                     <service_name>北京</service_name>
//                     <service_url>http://xiaofang.safecity119.com/</service_url>
//                     <service_name>河北</service_name>
//                     <service_url>http://xiaofang.safecity119.com/</service_url>
//                     <service_name>河南</service_name>
//                     <service_url>http://123.160.247.85/</service_url>
//                     <service_name>广西</service_name>
//                     <service_url>http://xiaofang.safecity119.com/</service_url>
//                     <service_name>吉林</service_name>
//                     <service_url>http://111.26.193.208:8089/</service_url>
//                     <service_name>云南</service_name>
//                     <service_url>http://xiaofang.safecity119.com/</service_url>
//                     <service_name>武汉</service_name>
//                     <service_url>http://58.48.195.19:8089/</service_url>
//                     <service_name>襄阳</service_name>
//                     <service_url>http://120.202.192.67:8089/</service_url>
//                     </service_version>


    //public static  String URL_SERVER = UserID.SERVES;


    //private static SPUtil spUtil=new SPUtil();


    // public static String url= Userid.getUrl();

    //================= PATH ====================


    /**
     * 设备类型
     */

    public static String URL_DeviceTYPE = "getDeviceTypeNoPicApp.action";
    /**
     * 设备查询
     */
    public static String URL_GetDevice = "getDeviceByDeviceIdApp.action?deviceId=";


    //李岩接口
    //登陆接口
    public final static String URL_Login = "user_api.do?formAction=checkLogin";




    //获取单个设备
    public static String URL_GETDEVICEBYID = "xf_api.do?formAction=getDeviceId";


    //获取任务接口  getPollingTask
    public static String URL_CheckJob_Li = "xf_api.do?formAction=getPollingTask";


    //巡检任务提交
    //获取任务接口  /xf_api.do?formAction=upPollingTask
    public static String URL_CheckJob_UP = "xf_api.do?formAction=upPollingTask";



    //设备图片路径
    public static String URL_PIC_Path = "images/device/";

    //人员信息修改  /user_api.do?formAction=update
    public static final String URL_UPdate = "user_api.do?formAction=update";

    //人员头像上传/user_api.do?formAction=setUserHead
    public final static String URL_etUserHead = "user_api.do?formAction=setUserHead";

    //意见反馈接口comment_api.do?formAction=addFaq
    public final static String URL_AddFaq = "comment_api.do?formAction=addFaq";

    //新闻资讯 news_api.do?formAction=getNewsList 19  384
    public static String URL_GetNewsList = "news_api.do?formAction=getNewsList";

    //任务进度 news_api.do?formAction=getTaskJidu taskStartDate1 taskStartDate2 userId

    public static String URL_getTaskJidu = "xf_api.do?formAction=getTaskJidu";

    //检查方法的web接口  /xf_api.do?formAction=getDeviceTypeDesc&deviceTypeId=121&type=1
    //deviceTypeId 为设备类型ID，type1为检查方法，2为常见问题
    public static String URL_getDeviceTypeDesc = "xf_api.do?formAction=getDeviceTypeDesc&deviceTypeId=";

    //获取自建任务列表http://192.168.1.92:8080//xf_api.do?formAction=getCheckTask&userId =
    public static String URL_getCheckTask = "xf_api.do?formAction=getCheckTask";

    //视频上传接口xf_api.do?formAction=setVideo
    public static String URL_setVideo = "xf_api.do?formAction=setVideo";

    //视频学习，获取视频的接口
    // news_api.do?formAction=videoLis
    public static String URL_videoList = "news_api.do?formAction=videoList";

    // news_api.do?formAction=videoShow&id=xxx
    public static String URL_videoShow = "news_api.do?formAction=videoShow&id=";

    //news_api.do?formAction=yuanList
    public static String URL_yuanList = "news_api.do?formAction=yuanList";

    //news_api.do?formAction=yuanShow&id=xxx
    public static String URL_yuanShow = "news_api.do?formAction=yuanShow&id=";

    //xf_api.do?formAction=completeCheckTask
//     userId;	（用户ID）（必须）
//     checkTaskId； 自检任务ID（必须）
//     pics；图片（非必须）
//     videos；视频（非必须）
//     checkRemark；自检完成（非必须）

    public static String URL_completeCheckTask = "xf_api.do?formAction=completeCheckTask";

    //http://localhost:8080/user/examQuestion.do?formAction=init&userId=5229
    public static String URL_examQuestion = "user/examQuestion.do?formAction=init&userId=";

    ///xf_api.do?formAction=getMessage
    public static String URL_getMessage = "xf_api.do?formAction=getMessage";


    ///xf_api.do?formAction=getMicBuild  小微场所
    public static String URL_getMicBuild2 = "xf_api.do?formAction=getMessage2";


    //维保任务接口  /xf_api.do?formAction=upPollingTaskError
    public static String URL_TaskError = "xf_api.do?formAction=upPollingTaskError";

    //获取单位信息接口/xf_api.do?formAction=getQueryCheckReport
    public static String URL_getQueryCheckReport = "xf_api.do?formAction=getQueryCheckReport";
    //获取单位信息接口/xf_api.do?formAction=getQueryCheckReport
    public static String URL_getQueryCheckReport_new = "xf_api.do?formAction=organizationListApp";


    //获取督办消息接口/news_api.do?formAction=dubanList&type=duban
    public static String URL_dubanList = "news_api.do?formAction=dubanList&type=duban";

    //上报下发 /user/news_ web.do?formAction=save&type=duban
    public static String URL_duban = "user/news_web.do?formAction=save&type=duban";

    //添加回复
    ///news_ api.do?formAction=commentAdd

    public static String URL_commentAdd = "news_api.do?formAction=commentAdd";
    // 单位查询接口 /xf_api.do?formAction=organizationShowApp
    public static String URL_organization = "xf_api.do?formAction=organizationShowApp";

    //待办接口/xf_api.do?formAction=daiban
    public static String URL_daiban = "xf_api.do?formAction=daiban";

    ///xf_api.do?formAction=checkGrade&orgId=59 考核评分 列表
    public static String URL_checkGrade = "xf_api.do?formAction=getCheckGrade&userId=";

    ///xf_api.do?formAction=checkGrade&orgId=59 考核评分
    public static String URL_CheckGrade = "xf_api.do?formAction=checkGrade&orgId=";


    ///xf_api.do?formAction=getCheckRule&userId= 督导记录 列表
    public static String URL_CheckRule = "xf_api.do?formAction=checkRule&orgId=";


    ///xf_api.do?formAction=getCheckRule&userId= 督导记录 列表
    public static String URL_getCheckRule = "xf_api.do?formAction=getCheckRule&userId=";
//    ///xf_api.do?formAction=getcheckGrade&orgId=59
//    public static final String URL_getcheckGrade = URL_SERVER +"/xf_api.do?formAction=getCheckRule&userId=";

    //新闻资讯  列表
//    news_api.do?formAction=getNewsList
//            nengli=13		消防安全管理情况                        "news_api.do?formAction=getNewsList"


    //获取部门内人员
    //user_api.do?formAction=getUserDept
    public static String URL_getUserDept = "user_api.do?formAction=getUserDept&userId=";

    //火灾报警接口xf_api.do?formAction=getFirmAlarm&fireType=0

    public static final String URL_getFirmAlarm = "xf_api.do?formAction=getFirmAlarm&fireType=0";

    //线路规划列表
    public static final String URL_GETXIAOFANGZHAN = "xf_api.do?formAction=getPathPlanning";

    //电气火灾列表 /xf_api.do?formAction=getElectrical
    public static String URL_getElectrical = "xf_api.do?formAction=getElectrical";

    //法泰电气火灾列表 /data-service/electric/history/list
    public static final String URL_ElectricalHistory = "data-service/electric/history/list";

    //室外消火栓http://192.168.1.237/data-service/hydrant/history/list
    public static final String URL_hydrantlHistory = "data-service/hydrant/history/list";

    //获取服务器  http://47.92.90.52:80/
    public static final String SELECT_SERVER = "http://47.92.90.52:80/service_version.xml";

    //摄像头列表
    public static final String URL_getFirmAlarmVideo = "xf_api.do?formAction=getFirmAlarmVideo";

    ///xf_api.do?formAction=getMicBuild  小微场所
    public static final String URL_getMicBuild = "xf_api.do?formAction=getMicBuild";

    //判断设备是否已经存在
    public static final String URL_IscunZai = "xf_api.do?formAction=checkDevice";


    //获取设备类型columnDesc 检查方法  remark 常见问题
    public final static String URL_DeviceTYPET = "xf_api.do?formAction=getDeviceType";

    //图片上传接口/user/device.do?formAction=setDevicePic
    public final static String URL_ImageUpLoad_Li = "user/device.do?formAction=setDevicePic";

    /**
     * 设备添加  李岩
     */
    public final static String URL_DeviceAddT = "user/device.do?formAction=save";


    //获取改单位下的设备
    public final static String URL_GETDEVICE = "xf_api.do?formAction=getDevice";
    /**
     * 服务器地址
     */
    public static  String URL_SERVER = "http://47.92.90.52:80/";



//    **********************************************************************************************************
//    **********************************************************************************************************
//    **********************************************************************************************************
//    **********************************************************************************************************


    public static final String PATH_DATA = MyApplication.getInstance().getCacheDir().getAbsolutePath() + File.separator + "data";

    public static final String PATH_CACHE = PATH_DATA + "/NetCache";

    public static final String PATH_SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "codeest" + File.separator + "GeekNews";


    //登录验证常 量KEY
    public static final String APIKEY="Tqp5$%HzzYrP#!00098yyYL-";

    //md5加密次数
    public static final int APICOUNT=4;

    //王宏岩IP　http://192.168.1.184:8083/login
    public static  String URL_SERVER_WANG = "http://192.168.1.184:8083/";

    //    测试接口 服务器地址
//  61.148.193.74:8083/electricZ/history/data 192.168.1.115:8080
    //public static  String URL_SERVER_CE = "http://61.148.193.74:8083/";
    static String server_address = SPUtil.getString(MyApplication.getInstance(),Constants_SP.SERVER_ADDRESS, "");


    public static  String URL_SERVER_CE = server_address;
    //获取验证码
    public final static String URL_SMS="sms";

    //验证码登录接口
    public final static String URL_CODELOGIN="login";

    public final static String URL_LOGOUT="logout";

    //  61.148.193.74:8083/electricZ/history/data  智慧用电
    public final static String URL_Electrical="electricZ/history/data";

    //  61.148.193.74:8083/electricZ/history/data  火灾报警
    public final static String URL_FireAlarm="cszz/history/data";

    //  61.148.193.74:8083/electricZ/history/data  无限烟感
    public final static String URL_Smoke="wxyg/history/data";

    //NB烟感
    public final static String URL_NBSmoke="nbyg/history/data";//NB烟感

    //NB井盖
    public final static String URL_NBJG="nbjg/history/data";//NB井盖


    //智慧门禁
    public final static String URL_ZHMJ="nbjg/history/data";//门禁


    //人脸识别
    public final static String URL_RLSB="face/history/data";//人脸识别


    //  61.148.193.74:8083/electricZ/history/data  电弧
    public final static String URL_DHTC="dhtc/history/data";

    //  61.148.193.74:8083/electricZ/history/data  室内水
    public final static String URL_XFSS="xfss/history/data";

    //  61.148.193.74:8083/electricZ/history/data  智慧用电F
    public final static String URL_ElectricalF="electricF/history/data";

    public final static String URL_ElectricalG="electricG/history/data";

    //  61.148.193.74:8083/electricZ/history/data  室外消防栓
    public final static String URL_HYDRANT="hydrant/history/data";
    

    //  61.148.193.74:8083/electricZ/history/data  视频监控
    public final static String URL_VIDEO="video/device/data";

    //   inspect/device/prepare 巡点预录入(获取设备类型)
    public final static String URL_DEVTYPE="inspect/device/prepare";

    //  巡点添加 inspect/device/input
    public final static String URL_INPUT="inspect/device/input";

    //巡点单条查询  /inspect/device/get/{dev_id}
    public final static String URL_GET="inspect/device/get/";

    //巡点列表查询  inspect/device/data
    public final static String URL_DATA="inspect/device/data";

    //巡点照片 /view/images/{dev_id}/devImage1.png
    public final static String URL_DVIMAGE="view/images/";

    //获取巡检任务  /inspect/task/data
    public final static String URL_TASK="inspect/task/data";

    //data-service/inspect/task/data  巡检作业列表
    public final static String URL_JOBLIST="inspect/job/data";

    //作业提交data-service/inspect/job/submit
    public final static String URL_JOBSUBMIT="inspect/job/submit";

    //故障列表  inspect/fault/data
    public final static String URL_FAULT="inspect/fault/data";


    //故障提交  inspect/fault/submit
    public final static String URL_FAULTUP="inspect/fault/submit";


    //消息获取  /notify//publish/data
    public final static String URL_MEGGET="notify//publish/data";


    //消息回复 /notify//publish/reply
    public final static String URL_MEGREPLY="notify//publish/reply";


    //http://192.168.1.102:8080/planning-learning-server/learner/login
    public final static String LOGIN_WU="http://192.168.1.102:8080/planning-learning-server/learner/login";

    public static final String URL_getNewsList = "message/history/data";
}